<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>">
	<title>广告位注册</title>
	<link rel="stylesheet" rev="stylesheet" href="css/style1.css"
			type="text/css" media="all" />
<style type="text/css">
<!--
.atten {
	font-size: 12px;
	font-weight: normal;
	color: #F00;
}
-->
</style>
<script language="JavaScript">
	//广告位的注册
	function addAdevertAddress() {
		document.editAdvertAddressForm.action = "advertAddressAct.action";
		document.editAdvertAddressForm.submit();
	}
	
	//广告位的修改
	function uptAdevertAddress(){
	document.editAdvertAddressForm.action = "advertAddressAct!uptAdvertAddress.action";
	document.editAdvertAddressForm.submit();
	}	
</script>
	</head>
	<body class="ContentBody">
		<form action="advertAddressAct.action" method="post"
			name="editAdvertAddressForm" id="editAdvertAddressForm"
			enctype="multipart/form-data">
			<s:hidden name="advertAddressVo.id" value="%{advertAddressVo.id}"></s:hidden>
			<s:set name="butFlgVal" value="%{butFlgVal}" />
			<div class="MainDiv">
				<table width="99%" border="0" cellpadding="0" cellspacing="0"
					class="CContent">
					<tr>
						<s:if test="#butFlgVal!='upt'">
							<th class="tablestyle_title" >广告位注册页面</th>
						</s:if>
						<s:else>
					  	<th class="tablestyle_title" >广告位修改页面</th>
						</s:else>
					</tr>
					<tr>
						<td class="CPanel">

							<table border="0" cellpadding="0" cellspacing="0"
								style="width: 100%">
								<tr>
									<td width="100%">
										<fieldset style="height: 100%;">
											<legend>
												广告位注册
											</legend>
											<table border="0" cellpadding="2" cellspacing="1"
												style="width: 100%">
												<tr>
													<td nowrap="nowrap" align="right" width="30%">
														广告位名字:
													</td>
													<td width="50%">
														<s:textfield name="advertAddressVo.advertName"
															theme="simple" size="30"></s:textfield>
														<span class="red"> *</span>
													</td>
												</tr>
												<tr>
													<td nowrap="nowrap" align="right" width="13%">
														广告位宽度:
													</td>
													<td width="87%">
														<s:textfield name="advertAddressVo.width" theme="simple"
															size="30"></s:textfield>
														<span class="red"> *</span>
													</td>
												</tr>
												<tr>
													<td nowrap="nowrap" align="right" width="13%">
														广告位高度:
													</td>
													<td width="87%">
														<s:textfield name="advertAddressVo.height" theme="simple"
															size="30"></s:textfield>
														<span class="red"> *</span>
													</td>
												</tr>
												<tr>
													<td nowrap="nowrap" align="right" width="13%">
														描述:
													</td>
													<td width="87%">
														<s:textarea name="advertAddressVo.notes" rows="4"
															cols="30" theme="simple"></s:textarea>
													</td>
												</tr>
												<tr>
													<td nowrap="nowrap" align="right" width="13%">
														默认广告类型:
													</td>
													<td width="87%">
														<s:action name="advertTypeAct!findAdvertType"
															id="advertDefTypeAct" />
														<s:select name="advertAddressVo.defType" listKey="code"
															listValue="value"
															list="#advertDefTypeAct.advertTypeVoList" theme="simple" />
														<span class="red"> *</span>
													</td>
												</tr>
												<tr>
													<td nowrap="nowrap" align="right" width="13%">
														默认文件路径:
													</td>
													<td width="87%">
														<s:file name="uploadFile" theme="simple"></s:file>
														<s:fielderror name="fielderrormassege" theme="simple" />
														<span class="red"> *</span>
													</td>
												</tr>
											</table>
											<br />
										</fieldset>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td colspan="2" align="center" height="50px">
							<s:if test="#butFlgVal!='upt'">
								<input type="button" name="addAdevertAddressBtn" value="保&nbsp存"
								onclick="javascript:addAdevertAddress();"></input>
							</s:if>
							<s:else>
						  	<input type="button" name="uptAdevertAddressBtn" value="修&nbsp改"
								onclick="javascript:uptAdevertAddress();"></input>
							</s:else>							
						</td>
					</tr>
				</table>
			</div>
		</form>
	</body>
</html>

